﻿using UnityEngine;
using System.Collections;

namespace Soomla.Store.Example {
	public class UnlockStage5 : MonoBehaviour {
		public Sprite vignetteDebloque;
		public coinInMenuChoix coin;

		
		void OnMouseDown()
		{
			PlayerPrefs.SetInt("niveau5Bloque",1);
			StoreInventory.TakeItem ("currency_coins", 5000);
			menuEnCour.menu=false;
			this.transform.parent.parent.GetComponent<SpriteRenderer>().sprite=vignetteDebloque;
			coin=(coinInMenuChoix)GameObject.FindObjectOfType(typeof(coinInMenuChoix));
			coin.refresh ();
			GameObject.Destroy(this.transform.parent.gameObject);
		}
	}
}